home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 January / PC Plus Super CD No55a (PCP-147A-1-99) (Disc 1) (1998).iso / linux / developers / visualtcl / windows / vtcl / lib / about.tcl next >
Encoding:
Text File  |  1997-04-09  |  3.2 KB  |  88 lines

  1. ##############################################################################
  2. # $Id: about.tcl,v 1.2 1997/04/09 13:12:59 stewart Exp $
  3. #
  4. # about.tcl - dialog "about Visual Tcl"
  5. #
  6. # Copyright (C) 1996-1997 Stewart Allen
  7. #
  8. # This program is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU General Public License
  10. # as published by the Free Software Foundation; either version 2
  11. # of the License, or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. ##############################################################################
  23. #
  24.  
  25. proc vTclWindow.vTcl.about {args} {
  26.     set base .vTcl.about
  27.     if {[winfo exists .vTcl.about]} {
  28.         wm deiconify .vTcl.about; return
  29.     }
  30.     toplevel .vTcl.about -class vTcl
  31.     wm transient .vTcl.about .vTcl
  32.     wm resizable .vTcl.about 0 0
  33.     wm withdraw .vTcl.about
  34.     wm title .vTcl.about "About Visual Tcl"
  35.     label .vTcl.about.lab6 \
  36.         -image title -relief raised -text label 
  37.     pack .vTcl.about.lab6 \
  38.         -in .vTcl.about -anchor center -expand 0 -fill none -ipadx 0 -ipady 0 \
  39.         -padx 5 -pady 5 -side top 
  40.     label .vTcl.about.lab7 \
  41.         -borderwidth 0 \
  42.         -text {Copyright (C) 1996-1997 Stewart Allen} 
  43.     pack .vTcl.about.lab7 \
  44.         -in .vTcl.about -anchor center -expand 1 -fill both -ipadx 0 -ipady 0 \
  45.         -padx 1 -pady 1 -side top 
  46.     label .vTcl.about.lab2 \
  47.         -borderwidth 0 \
  48.         -text (stewart@neuron.com) 
  49.     pack .vTcl.about.lab2 \
  50.         -in .vTcl.about -anchor center -expand 1 -fill both -ipadx 0 -ipady 0 \
  51.         -padx 0 -pady 0 -side top 
  52.     frame .vTcl.about.fra8 \
  53.         -height 30 -width 30 
  54.     pack .vTcl.about.fra8 \
  55.         -in .vTcl.about -anchor center -expand 1 -fill y -ipadx 0 -ipady 0 \
  56.         -padx 2 -pady 2 -side top 
  57.     label .vTcl.about.fra8.lab9 \
  58.         -borderwidth 0 \
  59.         -text Version 
  60.     pack .vTcl.about.fra8.lab9 \
  61.         -in .vTcl.about.fra8 -anchor center -expand 0 -fill none -ipadx 0 \
  62.         -ipady 0 -padx 0 -pady 0 -side left 
  63.     label .vTcl.about.fra8.lab10 \
  64.         -borderwidth 0 \
  65.          -text 1.04 \
  66.         -textvariable vTcl(version) 
  67.     pack .vTcl.about.fra8.lab10 \
  68.         -in .vTcl.about.fra8 -anchor center -expand 0 -fill none -ipadx 0 \
  69.         -ipady 0 -padx 0 -pady 0 -side left 
  70.     button .vTcl.about.but11 \
  71.         -command {destroy .vTcl.about} \
  72.          -padx 11 \
  73.         -pady 4 -text OK 
  74.     pack .vTcl.about.but11 \
  75.         -in .vTcl.about -anchor center -expand 0 -fill x -ipadx 0 -ipady 0 \
  76.         -padx 0 -pady 0 -side top 
  77.     update idletasks
  78.     set sw [winfo screenwidth .]
  79.     set sh [winfo screenheight .]
  80.     set w [winfo reqwidth .vTcl.about]
  81.     set h [winfo reqheight .vTcl.about]
  82.     set x [expr ($sw - $w)/2]
  83.     set y [expr ($sh - $h)/2]
  84.     wm geometry .vTcl.about ${w}x${h}+$x+$y
  85.     wm deiconify .vTcl.about
  86. }
  87.  
  88.